<?php
	require "../dao/staff_dao.php";
	
	$teacher = [];
	$teacher['tschool'] = $_POST['tschool'];
	$teacher['tname'] = $_POST['tname'];
	$teacher['tnumber'] = $_POST['tnumber'];
	$teacher['tsex'] = $_POST['tsex'];
	$teacher['tattr'] = $_POST['tattr'];
	$teacher['tcollegeid'] = $_POST['tcollegeid'];
	$teacher['tcourse'] = $_POST['tcourse'];
	$teacher['tphone'] = $_POST['tphone'];
	$teacher['tdesc'] = $_POST['tdesc'];
	$teacher['tnative'] = $_POST['tnative'];
	$teacher['tidnumber'] = $_POST['tidnumber'];
	
	$flag = insertTeacher($teacher);
	
	if($flag){
?>
		<script>
			alert("添加成功。。。。");
			location.href = "S_insertTea_information.php";
		</script>
<?php
	}else{
?>
		<script>
			alert("添加失败。。。。");
			location.href = "S_insertTea_information.php";
		</script>
<?php
	}
?>